package zjitc.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zjitc.dao.UserMapper;
import zjitc.po.User;
import zjitc.service.UserService;

import java.util.List;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/12 16:52
 * @description:
 */
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
    @Override
    public List<User> findAllUser() {
        return userMapper.findAllUser();
    }

  @Override
  public int deleteUserByUid(Integer id) {
    return userMapper.deleteUserByUid(id);
  }

  @Override
  public User userLogin(String username, String password) {
    return userMapper.userLogin(username,password);
  }

  @Override
  public User findByUsername(String username) {
    return userMapper.findByUsername(username);
  }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

  @Override
  public User findByUid(int uid) {
    return userMapper.findByUid(uid);
  }
}
